package com.heima.kafka.comsumer;

import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerListener {


    @KafkaListener(topics ={"boot-01"} )
    public void getMessage(ConsumerRecord consumerRecord){
        System.out.println(consumerRecord.key()+":"+consumerRecord.value());
    }
}